package cn.haohaowo.spring.chapter12;

import junit.framework.Assert;

import org.junit.Before;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class AnnotionTest {
	
	private ApplicationContext context;
	
	@Before
	public void setUp() {
		context = new ClassPathXmlApplicationContext("chapter12-app.xml");
	}
	
	@Test
	public void requireAnnotionTest() {
		TestBean testBean = context.getBean("testBean", TestBean.class);
		Assert.assertEquals("hello1", testBean.getMessage());
	}

}
